//
//  ListenHeadsCollectionReusableView.swift
//  xmly
//
//  Created by 刘文超 on 2020/2/4.
//  Copyright © 2020 刘文超. All rights reserved.
//

import UIKit

class ListenHeadsCollectionReusableView: UICollectionReusableView {
    
    lazy var leftImageView:UIImageView = {
        let imageview = UIImageView.init()
        imageview.backgroundColor = arc4randomColor
        imageview.contentMode = .scaleAspectFit
        imageview.image = UIImage.init(named: "vip")
        return imageview
    }()
    
    
    lazy var titleLabel:UILabel = {
        let label = UILabel.init()
        label.text = "最新动画"
        label.font = .systemFont(ofSize: 16)
        return label
    }()
    
    
    lazy var imageView:UIImageView = {
        let imageview = UIImageView.init()
        imageview.backgroundColor = arc4randomColor
        imageview.contentMode = .scaleAspectFit
        imageview.image = UIImage.init(named: "abc_ic_more_gray_22x22_")
        return imageview
    }()
    
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setUI()
    }
    
    func setUI() {
        
        self.addSubview(self.leftImageView)
        leftImageView.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(KBlackspace)
            make.centerY.equalToSuperview()
            make.height.width.equalTo(30)
        }
        self.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { (make) in
            make.left.equalTo(leftImageView.snp.right).offset(KSmallspace)
            make.centerY.equalToSuperview()
        }
        self.addSubview(imageView)
        imageView.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-KBlackspace)
            make.centerY.equalToSuperview()
            make.height.width.equalTo(30);
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
